package com.sense.jdbc;

import com.sense.jdbc.cache.ICache;
import com.sense.jdbc.mapper.IMapper;

import java.util.List;


/**
 * Creator: LanJian (lanjian860217@gmail.com)
 * Date: 1/31/11
 * Time: 3:48 PM
 */
public interface ISql {
    /*
     * @param sql
     * @param mapper
     * @return
     */
    public List queryForList(String sql, IMapper mapper);

    /**
     * @param sql
     * @param objects
     * @param mapper
     * @return
     */
    public List queryForList(String sql, Object[] objects, IMapper mapper);

    /**
     * @param sql
     * @param objects
     * @param mapper
     * @param cache
     * @return
     */
    public List queryForList(String sql, Object[] objects, IMapper mapper, ICache cache);

    /**
     * @param sql
     * @param mapper
     * @return
     */
    public Object queryForObject(String sql, IMapper mapper);

    /**
     * @param sql
     * @param objects
     * @param mapper
     * @return
     */
    public Object queryForObject(String sql, Object[] objects, IMapper mapper);

    /**
     * @param sql
     * @param objects
     * @param mapper
     * @param cache
     * @return
     */
    public Object queryForObject(String sql, Object[] objects, IMapper mapper, ICache cache);

}
